3.2.55 \(\int \csc ^3(e+f x) (a+b \sin (e+f x)) \, dx\) [155]

Optimal. Leaf size=48 \[ -\frac {a \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {b \cot (e+f x)}{f}-\frac {a \cot (e+f x) \csc (e+f x)}{2 f} \]

[Out]

-1/2*a*arctanh(cos(f*x+e))/f-b*cot(f*x+e)/f-1/2*a*cot(f*x+e)*csc(f*x+e)/f

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {2827, 3853, 3855, 3852, 8} \begin {gather*} -\frac {a \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}-\frac {b \cot (e+f x)}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^3*(a + b*Sin[e + f*x]),x]

[Out]

-1/2*(a*ArcTanh[Cos[e + f*x]])/f - (b*Cot[e + f*x])/f - (a*Cot[e + f*x]*Csc[e + f*x])/(2*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2827

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \csc ^3(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \csc ^3(e+f x) \, dx+b \int \csc ^2(e+f x) \, dx\\ &=-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}+\frac {1}{2} a \int \csc (e+f x) \, dx-\frac {b \text {Subst}(\int 1 \, dx,x,\cot (e+f x))}{f}\\ &=-\frac {a \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {b \cot (e+f x)}{f}-\frac {a \cot (e+f x) \csc (e+f x)}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 91, normalized size = 1.90 \begin {gather*} -\frac {b \cot (e+f x)}{f}-\frac {a \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}-\frac {a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {a \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^3*(a + b*Sin[e + f*x]),x]

[Out]

-((b*Cot[e + f*x])/f) - (a*Csc[(e + f*x)/2]^2)/(8*f) - (a*Log[Cos[(e + f*x)/2]])/(2*f) + (a*Log[Sin[(e + f*x)/
2]])/(2*f) + (a*Sec[(e + f*x)/2]^2)/(8*f)

________________________________________________________________________________________

Maple [A]
time = 0.23, size = 50, normalized size = 1.04

method result size
derivativedivides \(\frac {a \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )-b \cot \left (f x +e \right )}{f}\) \(50\)
default \(\frac {a \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )-b \cot \left (f x +e \right )}{f}\) \(50\)
risch \(-\frac {i \left (i a \,{\mathrm e}^{3 i \left (f x +e \right )}+i a \,{\mathrm e}^{i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}-2 b \right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}-\frac {a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{2 f}+\frac {a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{2 f}\) \(99\)
norman \(\frac {-\frac {a}{8 f}+\frac {a \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 f}-\frac {b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 f}+\frac {b \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}-\frac {a \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}+\frac {a \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}\) \(118\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^3*(a+b*sin(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*(a*(-1/2*csc(f*x+e)*cot(f*x+e)+1/2*ln(csc(f*x+e)-cot(f*x+e)))-b*cot(f*x+e))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 65, normalized size = 1.35 \begin {gather*} \frac {a {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {4 \, b}{\tan \left (f x + e\right )}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/4*(a*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) + log(cos(f*x + e) - 1)) - 4*b/tan(f*x + e
))/f

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (48) = 96\).
time = 0.36, size = 104, normalized size = 2.17 \begin {gather*} \frac {4 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 2 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left (a \cos \left (f x + e\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{4 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/4*(4*b*cos(f*x + e)*sin(f*x + e) + 2*a*cos(f*x + e) - (a*cos(f*x + e)^2 - a)*log(1/2*cos(f*x + e) + 1/2) + (
a*cos(f*x + e)^2 - a)*log(-1/2*cos(f*x + e) + 1/2))/(f*cos(f*x + e)^2 - f)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (e + f x \right )}\right ) \csc ^{3}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**3*(a+b*sin(f*x+e)),x)

[Out]

Integral((a + b*sin(e + f*x))*csc(e + f*x)**3, x)

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 92, normalized size = 1.92 \begin {gather*} \frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \frac {6 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + a}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}}{8 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="giac")

[Out]

1/8*(a*tan(1/2*f*x + 1/2*e)^2 + 4*a*log(abs(tan(1/2*f*x + 1/2*e))) + 4*b*tan(1/2*f*x + 1/2*e) - (6*a*tan(1/2*f
*x + 1/2*e)^2 + 4*b*tan(1/2*f*x + 1/2*e) + a)/tan(1/2*f*x + 1/2*e)^2)/f

________________________________________________________________________________________

Mupad [B]
time = 6.72, size = 81, normalized size = 1.69 \begin {gather*} \frac {b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2\,f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a}{2}+2\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{4\,f}+\frac {a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{2\,f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(e + f*x))/sin(e + f*x)^3,x)

[Out]

(b*tan(e/2 + (f*x)/2))/(2*f) - (cot(e/2 + (f*x)/2)^2*(a/2 + 2*b*tan(e/2 + (f*x)/2)))/(4*f) + (a*tan(e/2 + (f*x
)/2)^2)/(8*f) + (a*log(tan(e/2 + (f*x)/2)))/(2*f)

________________________________________________________________________________________